serialization and deserialization in c#.
What is serialization and deserialization in c# ?
133327-Dec-2018
Updated on 03-Apr-2019
Home / DeveloperSection / Forums / What is serialization and deserialization in c# ?
serialization and deserialization in c#.
Anonymous User
27-Dec-2018Hi, Rahul
How are you?
Here I'm describing serialization and deserialization in brief.
The Serialization is a process of bringing an object into a form that it can be written on stream. This is the process of converting the object into a form so that it can be stored on a file, database, or memory; or, it can be transferred across the network. That is the main purpose is to save the state of the object so that it can be recreated when needed. Into the C#, the serialization is the process of converting the object into byte stream so that it can be saved to memory, file or database. This is the reverse process of serialization is called deserialization. Serialization is internally used in remote applications. The serialization is a process of converting the object into a stream of bytes to store the object or transmit it to memory, a database, or a file. This is the main purpose is to save the state of an object in order to be able to recreate it when needed. That is the reverse process is called deserialization. An object is serialized to a stream, which carries not just the data, but information about the object's type, such as its version, culture, and assembly name. By that stream, it can be stored in a database, a file, or memory.
Utilization of serialization
The serialization allows the developer to save the state of the object and recreate it as needed, providing storage of objects as well as data exchange. Via serialization, a developer can perform actions like sending the object to a remote application by means of a Web Service, passing the object from one domain to another, passing the object through a firewall as an XML string, or maintaining security or user-specific information across applications.
There are three formats of serialization
Binary Serialization: The Light and compact used in Remoting .
SOAP Serialization: The Interoperable use SOAP and used in Web Services .
XML Serialization : The Custom Serialization.
I hope you have found the right answer to your question.